@use '@angular/material/core/tokens/token-utils';
@use '@angular/material/core/style/sass-utils';

// The prefix used to generate the fully qualified name for tokens in this file.
$global-prefix: ngm;
$prefix: (ngm, sps-viewer);

@function get-unthemable-tokens() {
  @return (
    container-rounded: var(--#{$global-prefix}-primary-container-rounded)
  );
}

@function get-color-tokens() {
  @return (
    color-surface: var(--#{$global-prefix}-color-surface),
    color-surface-container: var(--#{$global-prefix}-color-surface-container),
  );
}

@function get-token-slots() {
  @return sass-utils.deep-merge-all(
    get-unthemable-tokens(),
    get-color-tokens(),
  );
}

:host {
  @include token-utils.create-token-values($prefix, get-token-slots());
  @apply flex w-full h-full overflow-hidden;

  &.pac-story-point.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
  }
}

@include token-utils.use-tokens($prefix, get-token-slots()) {
  .pac-story-bar {
    background-color: var(#{token-utils.get-token-variable(color-surface-container)});
  }
  .pac-single-page-story {
    border-top-left-radius: var(#{token-utils.get-token-variable(container-rounded)});
  }
}

.pac-story-bar {
  @apply px-0 w-0;
  max-width: 0;
  &.opened {
    @apply px-2 w-14;
    max-width: 3.5rem;
  }
}